package org.ruanjj.designmodel;

import org.ruanjj.designmodel.factorymodel.IphoneFactory;

import javax.sql.DataSource;
import java.util.*;
import java.util.concurrent.*;

public class Main {
    public static void main(String[] args) {
        List<String> a = new ArrayList<>();
        String b = "()";
        for(int i = 0; i < b.length(); i++){
            System.out.println(b.charAt(i));
        }

        ConcurrentHashMap map = new ConcurrentHashMap();
        map.put("key1","123");

        map.size();

      Stack c = new Stack();
      LinkedList d = new LinkedList();
    //  d.pop();

      Deque e = new LinkedList();
      e.addFirst(1);
      e.addLast(2);
      System.out.println(e.toString());

      Set s = new HashSet();

      FutureTask f = new FutureTask(new Callable() {
          @Override
          public Object call() throws Exception {
              System.out.println("尝试Callable接口创建线程");
              return 0;
          }
      });

      Thread t =  new Thread(f);
      t.start();

      ExecutorService pool = Executors.newFixedThreadPool(3);
      pool.submit(()->{

      });
    }
}
